<!-- 轮播图 -->
<template>
  <div class="w_1000 carousel">
    <el-carousel :interval="4000" type="card" height="260px">
        <el-carousel-item v-for="item in images" :key="item.Guid">
          <img class="carousel-img" :src="ApiUrl+item.ImageUrl" alt="轮播图">
        </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
import { carousel } from '@/api/data';
import {ApiUrl} from '@/config/env';
export default {
  data() {
    return {
      ApiUrl:ApiUrl,
      images: []
    };
    
  },

  /**ajax数据初始化钩子 */
  async mounted(){
    let json = new Object();
    const res = await carousel(json);
    if(res.code==0){
      this.images=res.data;
    }
  },

  /** 组件注册 */
  components: {}
};
</script>
<style scoped>
.carousel{
    padding: 20px 0;
}
.carousel-img{
    height: 100%;
    width: 100%;
}
</style>